#include <sys/types.h>
#include <utime.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(int argc, char **argv)
{
    struct utimbuf utm_buf;
    time_t cur_sec;

    if(-1 == access(argv[1], F_OK)){
        printf("%s: doesn't exist!\n", argv[1]);
        exit(-1);
    }

    time(&cur_sec);
    utm_buf.actime = cur_sec;
    utm_buf.modtime = cur_sec;

    if(-1 == utime(argv[1], &utm_buf)){
        perror("utime error");
        exit(-1);
    }

    exit(0);
}